#include<iostream> 
#include<cmath> 
using namespace std;
 
class complex
{
private:
        double real;
        double imag;
public:
       void init (double r ,double i) 
       {
            real=r;
            imag=i; 
       } 
       double realcomplex()   {return real;} 
       double imagcomplex()   {return imag;} 
       double abscomplex()    {return sqrt(real*real+imag*imag);} 
} ; 


int main()
{
    complex a ;
    a.init(1.1,2.2);
    cout<<"real:" <<a.realcomplex()<<endl;
    cout<<"image:" <<a.imagcomplex()<<endl;
    cout<<"abs:"<<a.abscomplex()<<endl;
    system("pause") ;
    return 0; 
} 
